using SS;
using System;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Windows.Forms;
namespace TVSGPP.doctor
{
	public class frmListPatient : Form
	{
		private DataSet ds = new DataSet();
		private Func objFunc = new Func();
		public bool isSelect = false;
		private IContainer components = null;
		private Label label1;
		private GroupBox groupBox1;
		private Label lblSTT;
		private Label lblPID;
		private Label label4;
		private Label label6;
		private Label label8;
		private Label lblSBL;
		private Label label10;
		private Label lblNgayDK;
		private Label label12;
		private Label label14;
		private Label label16;
		private Label lblCMND;
		private Label label18;
		private Label lblBacSi;
		private Label label19;
		private Label label22;
		private Label lblGhiChu;
		private Label label24;
		private DataGridView dgvPatientInfo;
		private BindingNavigator bindingNavigator1;
		private ToolStripLabel bindingNavigatorCountItem;
		private ToolStripButton bindingNavigatorMoveFirstItem;
		private ToolStripButton bindingNavigatorMovePreviousItem;
		private ToolStripSeparator bindingNavigatorSeparator;
		private ToolStripTextBox bindingNavigatorPositionItem;
		private ToolStripSeparator bindingNavigatorSeparator1;
		private ToolStripButton bindingNavigatorMoveNextItem;
		private ToolStripButton bindingNavigatorMoveLastItem;
		private ToolStripSeparator bindingNavigatorSeparator2;
		private Button btnSelect;
		private Button button1;
		private Label label25;
		private Label label26;
		private Label label27;
		private Button btnSearch;
		private TextBox txtSearchBySID;
		private TextBox txtSearchBySBL;
		public Label lblHoTen;
		public Label lblNamSinh;
		public Label lblGioiTinh;
		public Label lblDienThoai;
		public Label lblDiaChi;
		private DataGridViewTextBoxColumn SID;
		private DataGridViewTextBoxColumn SoBL;
		private DataGridViewTextBoxColumn HoTen;
		private DataGridViewTextBoxColumn NamSinh;
		private DataGridViewTextBoxColumn SoDT;
		private DataGridViewTextBoxColumn DiaChi;
		private DataGridViewTextBoxColumn Phai;
		private DataGridViewTextBoxColumn SoCMND;
		private DataGridViewTextBoxColumn ChanDoan;
		private DataGridViewTextBoxColumn BacSi;
		private DataGridViewTextBoxColumn GhiChu;
		private DataGridViewTextBoxColumn STT;
		private DataGridViewTextBoxColumn PID;
		private DataGridViewTextBoxColumn NgayDangKy;
		public frmListPatient()
		{
			this.InitializeComponent();
		}
		private void button1_Click(object sender, EventArgs e)
		{
			this.isSelect = false;
			base.Close();
		}
		private void frmListPatient_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyData == Keys.Escape)
			{
				base.Close();
			}
		}
		private void frmListPatient_Load(object sender, EventArgs e)
		{
			try
			{
				SqlConnection sqlConnection = new SqlConnection(this.objFunc.getConnectionStringOther());
				sqlConnection.Open();
				SqlCommand sqlCommand = new SqlCommand(ConfigurationSettings.AppSettings["StoredName"].ToString(), sqlConnection);
				sqlCommand.CommandType = CommandType.StoredProcedure;
				SqlDataAdapter sqlDataAdapter = new SqlDataAdapter();
				sqlDataAdapter.SelectCommand = sqlCommand;
				DataSet dataSet = new DataSet();
				sqlDataAdapter.Fill(dataSet, "listPatientInfo");
				BindingSource bindingSource = new BindingSource();
				bindingSource.DataSource = dataSet.Tables["listPatientInfo"];
				this.bindingNavigator1.BindingSource = bindingSource;
				this.dgvPatientInfo.DataSource = bindingSource;
				sqlConnection.Close();
				sqlConnection.Dispose();
			}
			catch
			{
				MessageBox.Show("Không thể kết nối đến nguồn dữ liệu của bệnh nhân", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			this.lblSTT.Text = "";
			this.lblPID.Text = "";
			this.lblSBL.Text = "";
			this.lblNgayDK.Text = "";
			this.lblBacSi.Text = "";
			this.lblHoTen.Text = "";
			this.lblNamSinh.Text = "";
			this.lblGioiTinh.Text = "";
			this.lblCMND.Text = "";
			this.lblDiaChi.Text = "";
			this.lblDienThoai.Text = "";
			this.lblGhiChu.Text = "";
			if (this.txtSearchBySID.Text != "")
			{
				for (int i = 0; i < this.dgvPatientInfo.Rows.Count; i++)
				{
					if (this.dgvPatientInfo.Rows[i].Cells["SID"].Value.ToString().Trim() == this.txtSearchBySID.Text.Trim())
					{
						try
						{
							this.dgvPatientInfo.FirstDisplayedScrollingRowIndex = i;
							this.dgvPatientInfo.Rows[i].Selected = true;
							this.dgvPatientInfo.CurrentCell = this.dgvPatientInfo.Rows[i].Cells[0];
							this.lblSTT.Text = this.dgvPatientInfo.Rows[i].Cells["STT"].Value.ToString();
							this.lblPID.Text = this.dgvPatientInfo.Rows[i].Cells["PID"].Value.ToString();
							this.lblSBL.Text = this.dgvPatientInfo.Rows[i].Cells["SoBL"].Value.ToString();
							this.lblNgayDK.Text = this.dgvPatientInfo.Rows[i].Cells["NgayDangKy"].Value.ToString();
							this.lblBacSi.Text = this.dgvPatientInfo.Rows[i].Cells["BacSi"].Value.ToString();
							this.lblHoTen.Text = this.dgvPatientInfo.Rows[i].Cells["HoTen"].Value.ToString();
							this.lblNamSinh.Text = this.dgvPatientInfo.Rows[i].Cells["NamSinh"].Value.ToString();
							this.lblGioiTinh.Text = this.dgvPatientInfo.Rows[i].Cells["Phai"].Value.ToString().Replace("F", "Nữ").Replace("M", "Nam");
							this.lblCMND.Text = this.dgvPatientInfo.Rows[i].Cells["SOCMND"].Value.ToString();
							this.lblDiaChi.Text = this.dgvPatientInfo.Rows[i].Cells["DiaChi"].Value.ToString();
							this.lblDienThoai.Text = this.dgvPatientInfo.Rows[i].Cells["SoDT"].Value.ToString();
							this.lblGhiChu.Text = this.dgvPatientInfo.Rows[i].Cells["GhiChu"].Value.ToString();
						}
						catch
						{
						}
						return;
					}
				}
			}
			else
			{
				if (!(this.txtSearchBySBL.Text != ""))
				{
					MessageBox.Show("Thông tin nhập vào không đủ để tìm kiếm !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					return;
				}
				for (int i = 0; i < this.dgvPatientInfo.Rows.Count; i++)
				{
					if (this.dgvPatientInfo.Rows[i].Cells["SoBL"].Value.ToString().Trim() == this.txtSearchBySBL.Text.Trim())
					{
						try
						{
							this.dgvPatientInfo.FirstDisplayedScrollingRowIndex = i;
							this.dgvPatientInfo.Rows[i].Selected = true;
							this.dgvPatientInfo.CurrentCell = this.dgvPatientInfo.Rows[i].Cells[0];
							this.lblSTT.Text = this.dgvPatientInfo.Rows[i].Cells["STT"].Value.ToString();
							this.lblPID.Text = this.dgvPatientInfo.Rows[i].Cells["PID"].Value.ToString();
							this.lblSBL.Text = this.dgvPatientInfo.Rows[i].Cells["SoBL"].Value.ToString();
							this.lblNgayDK.Text = this.dgvPatientInfo.Rows[i].Cells["NgayDangKy"].Value.ToString();
							this.lblBacSi.Text = this.dgvPatientInfo.Rows[i].Cells["BacSi"].Value.ToString();
							this.lblHoTen.Text = this.dgvPatientInfo.Rows[i].Cells["HoTen"].Value.ToString();
							this.lblNamSinh.Text = this.dgvPatientInfo.Rows[i].Cells["NamSinh"].Value.ToString();
							this.lblGioiTinh.Text = this.dgvPatientInfo.Rows[i].Cells["Phai"].Value.ToString().Replace("F", "Nữ").Replace("M", "Nam");
							this.lblCMND.Text = this.dgvPatientInfo.Rows[i].Cells["SOCMND"].Value.ToString();
							this.lblDiaChi.Text = this.dgvPatientInfo.Rows[i].Cells["DiaChi"].Value.ToString();
							this.lblDienThoai.Text = this.dgvPatientInfo.Rows[i].Cells["SoDT"].Value.ToString();
							this.lblGhiChu.Text = this.dgvPatientInfo.Rows[i].Cells["GhiChu"].Value.ToString();
						}
						catch
						{
						}
						return;
					}
				}
			}
			MessageBox.Show("Không tìm thấy bệnh nhân nào !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
		}
		private void btnSelect_Click(object sender, EventArgs e)
		{
			if (this.lblHoTen.Text != "")
			{
				this.isSelect = true;
				base.Close();
			}
		}
		private void lblHoTen_TextChanged(object sender, EventArgs e)
		{
			if (this.lblHoTen.Text.Trim() != "")
			{
				this.btnSelect.Enabled = true;
			}
			else
			{
				this.btnSelect.Enabled = false;
			}
		}
		private void dgvPatientInfo_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			this.lblSTT.Text = "";
			this.lblPID.Text = "";
			this.lblSBL.Text = "";
			this.lblNgayDK.Text = "";
			this.lblBacSi.Text = "";
			this.lblHoTen.Text = "";
			this.lblNamSinh.Text = "";
			this.lblGioiTinh.Text = "";
			this.lblCMND.Text = "";
			this.lblDiaChi.Text = "";
			this.lblDienThoai.Text = "";
			this.lblGhiChu.Text = "";
			try
			{
				this.lblSTT.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["STT"].Value.ToString();
				this.lblPID.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["PID"].Value.ToString();
				this.lblSBL.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["SoBL"].Value.ToString();
				this.lblNgayDK.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["NgayDangKy"].Value.ToString();
				this.lblBacSi.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["BacSi"].Value.ToString();
				this.lblHoTen.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["HoTen"].Value.ToString();
				this.lblNamSinh.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["NamSinh"].Value.ToString();
				this.lblGioiTinh.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["Phai"].Value.ToString().Replace("F", "Nữ").Replace("M", "Nam");
				this.lblCMND.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["SOCMND"].Value.ToString();
				this.lblDiaChi.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["DiaChi"].Value.ToString();
				this.lblDienThoai.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["SoDT"].Value.ToString();
				this.lblGhiChu.Text = this.dgvPatientInfo.Rows[e.RowIndex].Cells["GhiChu"].Value.ToString();
			}
			catch
			{
			}
		}
		private void txtSearchBySID_Enter(object sender, EventArgs e)
		{
			this.txtSearchBySBL.Text = "";
		}
		private void txtSearchBySBL_Enter(object sender, EventArgs e)
		{
			this.txtSearchBySID.Text = "";
		}
		private void txtSearchBySID_KeyDown(object sender, KeyEventArgs e)
		{
			if (!(this.txtSearchBySID.Text.Trim() == ""))
			{
				if (e.KeyCode == Keys.Return)
				{
					if (this.txtSearchBySID.Text != "")
					{
						for (int i = 0; i < this.dgvPatientInfo.Rows.Count; i++)
						{
							if (this.dgvPatientInfo.Rows[i].Cells["SID"].Value.ToString().Trim().Substring(7, this.dgvPatientInfo.Rows[i].Cells["SID"].Value.ToString().Trim().Length - 7) == this.txtSearchBySID.Text.Trim())
							{
								try
								{
									this.dgvPatientInfo.FirstDisplayedScrollingRowIndex = i;
									this.dgvPatientInfo.Rows[i].Selected = true;
									this.dgvPatientInfo.CurrentCell = this.dgvPatientInfo.Rows[i].Cells[0];
									this.lblSTT.Text = this.dgvPatientInfo.Rows[i].Cells["STT"].Value.ToString();
									this.lblPID.Text = this.dgvPatientInfo.Rows[i].Cells["PID"].Value.ToString();
									this.lblSBL.Text = this.dgvPatientInfo.Rows[i].Cells["SoBL"].Value.ToString();
									this.lblNgayDK.Text = this.dgvPatientInfo.Rows[i].Cells["NgayDangKy"].Value.ToString();
									this.lblBacSi.Text = this.dgvPatientInfo.Rows[i].Cells["BacSi"].Value.ToString();
									this.lblHoTen.Text = this.dgvPatientInfo.Rows[i].Cells["HoTen"].Value.ToString();
									this.lblNamSinh.Text = this.dgvPatientInfo.Rows[i].Cells["NamSinh"].Value.ToString();
									this.lblGioiTinh.Text = this.dgvPatientInfo.Rows[i].Cells["Phai"].Value.ToString().Replace("F", "Nữ").Replace("M", "Nam");
									this.lblCMND.Text = this.dgvPatientInfo.Rows[i].Cells["SOCMND"].Value.ToString();
									this.lblDiaChi.Text = this.dgvPatientInfo.Rows[i].Cells["DiaChi"].Value.ToString();
									this.lblDienThoai.Text = this.dgvPatientInfo.Rows[i].Cells["SoDT"].Value.ToString();
									this.lblGhiChu.Text = this.dgvPatientInfo.Rows[i].Cells["GhiChu"].Value.ToString();
								}
								catch
								{
								}
								break;
							}
						}
					}
				}
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.components = new Container();
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmListPatient));
			this.label1 = new Label();
			this.groupBox1 = new GroupBox();
			this.lblGhiChu = new Label();
			this.label24 = new Label();
			this.lblDienThoai = new Label();
			this.label22 = new Label();
			this.lblBacSi = new Label();
			this.label19 = new Label();
			this.lblCMND = new Label();
			this.label18 = new Label();
			this.lblGioiTinh = new Label();
			this.label16 = new Label();
			this.lblNamSinh = new Label();
			this.label14 = new Label();
			this.lblNgayDK = new Label();
			this.label12 = new Label();
			this.lblSBL = new Label();
			this.label10 = new Label();
			this.lblDiaChi = new Label();
			this.label8 = new Label();
			this.lblHoTen = new Label();
			this.label6 = new Label();
			this.lblPID = new Label();
			this.label4 = new Label();
			this.lblSTT = new Label();
			this.dgvPatientInfo = new DataGridView();
			this.SID = new DataGridViewTextBoxColumn();
			this.SoBL = new DataGridViewTextBoxColumn();
			this.HoTen = new DataGridViewTextBoxColumn();
			this.NamSinh = new DataGridViewTextBoxColumn();
			this.SoDT = new DataGridViewTextBoxColumn();
			this.DiaChi = new DataGridViewTextBoxColumn();
			this.Phai = new DataGridViewTextBoxColumn();
			this.SoCMND = new DataGridViewTextBoxColumn();
			this.ChanDoan = new DataGridViewTextBoxColumn();
			this.BacSi = new DataGridViewTextBoxColumn();
			this.GhiChu = new DataGridViewTextBoxColumn();
			this.STT = new DataGridViewTextBoxColumn();
			this.PID = new DataGridViewTextBoxColumn();
			this.NgayDangKy = new DataGridViewTextBoxColumn();
			this.bindingNavigator1 = new BindingNavigator(this.components);
			this.bindingNavigatorCountItem = new ToolStripLabel();
			this.bindingNavigatorMoveFirstItem = new ToolStripButton();
			this.bindingNavigatorMovePreviousItem = new ToolStripButton();
			this.bindingNavigatorSeparator = new ToolStripSeparator();
			this.bindingNavigatorPositionItem = new ToolStripTextBox();
			this.bindingNavigatorSeparator1 = new ToolStripSeparator();
			this.bindingNavigatorMoveNextItem = new ToolStripButton();
			this.bindingNavigatorMoveLastItem = new ToolStripButton();
			this.bindingNavigatorSeparator2 = new ToolStripSeparator();
			this.btnSelect = new Button();
			this.button1 = new Button();
			this.label25 = new Label();
			this.label26 = new Label();
			this.label27 = new Label();
			this.btnSearch = new Button();
			this.txtSearchBySID = new TextBox();
			this.txtSearchBySBL = new TextBox();
			this.groupBox1.SuspendLayout();
			((ISupportInitialize)this.dgvPatientInfo).BeginInit();
			((ISupportInitialize)this.bindingNavigator1).BeginInit();
			this.bindingNavigator1.SuspendLayout();
			base.SuspendLayout();
			this.label1.AutoSize = true;
			this.label1.BackColor = SystemColors.Control;
			this.label1.Location = new Point(23, 26);
			this.label1.Name = "label1";
			this.label1.Size = new Size(35, 15);
			this.label1.TabIndex = 0;
			this.label1.Text = "STT :";
			this.label1.TextAlign = ContentAlignment.MiddleRight;
			this.groupBox1.Controls.Add(this.lblGhiChu);
			this.groupBox1.Controls.Add(this.label24);
			this.groupBox1.Controls.Add(this.lblDienThoai);
			this.groupBox1.Controls.Add(this.label22);
			this.groupBox1.Controls.Add(this.lblBacSi);
			this.groupBox1.Controls.Add(this.label19);
			this.groupBox1.Controls.Add(this.lblCMND);
			this.groupBox1.Controls.Add(this.label18);
			this.groupBox1.Controls.Add(this.lblGioiTinh);
			this.groupBox1.Controls.Add(this.label16);
			this.groupBox1.Controls.Add(this.lblNamSinh);
			this.groupBox1.Controls.Add(this.label14);
			this.groupBox1.Controls.Add(this.lblNgayDK);
			this.groupBox1.Controls.Add(this.label12);
			this.groupBox1.Controls.Add(this.lblSBL);
			this.groupBox1.Controls.Add(this.label10);
			this.groupBox1.Controls.Add(this.lblDiaChi);
			this.groupBox1.Controls.Add(this.label8);
			this.groupBox1.Controls.Add(this.lblHoTen);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.lblPID);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.lblSTT);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Location = new Point(6, 61);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(872, 124);
			this.groupBox1.TabIndex = 1;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin bệnh nhân";
			this.lblGhiChu.BackColor = Color.White;
			this.lblGhiChu.BorderStyle = BorderStyle.Fixed3D;
			this.lblGhiChu.Location = new Point(62, 96);
			this.lblGhiChu.Name = "lblGhiChu";
			this.lblGhiChu.Size = new Size(802, 20);
			this.lblGhiChu.TabIndex = 23;
			this.lblGhiChu.TextAlign = ContentAlignment.MiddleLeft;
			this.label24.AutoSize = true;
			this.label24.BackColor = SystemColors.Control;
			this.label24.Location = new Point(4, 98);
			this.label24.Name = "label24";
			this.label24.Size = new Size(55, 15);
			this.label24.TabIndex = 22;
			this.label24.Text = "Ghi chú :";
			this.label24.TextAlign = ContentAlignment.MiddleRight;
			this.lblDienThoai.BackColor = Color.White;
			this.lblDienThoai.BorderStyle = BorderStyle.Fixed3D;
			this.lblDienThoai.Location = new Point(716, 72);
			this.lblDienThoai.Name = "lblDienThoai";
			this.lblDienThoai.Size = new Size(148, 20);
			this.lblDienThoai.TabIndex = 21;
			this.lblDienThoai.TextAlign = ContentAlignment.MiddleLeft;
			this.label22.AutoSize = true;
			this.label22.BackColor = SystemColors.Control;
			this.label22.Location = new Point(645, 75);
			this.label22.Name = "label22";
			this.label22.Size = new Size(69, 15);
			this.label22.TabIndex = 20;
			this.label22.Text = "Điện thoại :";
			this.label22.TextAlign = ContentAlignment.MiddleRight;
			this.lblBacSi.BackColor = Color.White;
			this.lblBacSi.BorderStyle = BorderStyle.Fixed3D;
			this.lblBacSi.Location = new Point(716, 24);
			this.lblBacSi.Name = "lblBacSi";
			this.lblBacSi.Size = new Size(148, 20);
			this.lblBacSi.TabIndex = 19;
			this.lblBacSi.TextAlign = ContentAlignment.MiddleLeft;
			this.label19.AutoSize = true;
			this.label19.BackColor = SystemColors.Control;
			this.label19.Location = new Point(667, 27);
			this.label19.Name = "label19";
			this.label19.Size = new Size(47, 15);
			this.label19.TabIndex = 18;
			this.label19.Text = "Bác sĩ :";
			this.label19.TextAlign = ContentAlignment.MiddleRight;
			this.lblCMND.BackColor = Color.White;
			this.lblCMND.BorderStyle = BorderStyle.Fixed3D;
			this.lblCMND.Location = new Point(716, 48);
			this.lblCMND.Name = "lblCMND";
			this.lblCMND.Size = new Size(148, 20);
			this.lblCMND.TabIndex = 17;
			this.lblCMND.TextAlign = ContentAlignment.MiddleLeft;
			this.label18.AutoSize = true;
			this.label18.BackColor = SystemColors.Control;
			this.label18.Location = new Point(647, 50);
			this.label18.Name = "label18";
			this.label18.Size = new Size(67, 15);
			this.label18.TabIndex = 16;
			this.label18.Text = "Số CMND :";
			this.label18.TextAlign = ContentAlignment.MiddleRight;
			this.lblGioiTinh.BackColor = Color.White;
			this.lblGioiTinh.BorderStyle = BorderStyle.Fixed3D;
			this.lblGioiTinh.Location = new Point(544, 48);
			this.lblGioiTinh.Name = "lblGioiTinh";
			this.lblGioiTinh.Size = new Size(98, 20);
			this.lblGioiTinh.TabIndex = 15;
			this.lblGioiTinh.TextAlign = ContentAlignment.MiddleLeft;
			this.label16.AutoSize = true;
			this.label16.BackColor = SystemColors.Control;
			this.label16.Location = new Point(481, 50);
			this.label16.Name = "label16";
			this.label16.Size = new Size(59, 15);
			this.label16.TabIndex = 14;
			this.label16.Text = "Giới tính :";
			this.label16.TextAlign = ContentAlignment.MiddleRight;
			this.lblNamSinh.BackColor = Color.White;
			this.lblNamSinh.BorderStyle = BorderStyle.Fixed3D;
			this.lblNamSinh.Location = new Point(377, 48);
			this.lblNamSinh.Name = "lblNamSinh";
			this.lblNamSinh.Size = new Size(98, 20);
			this.lblNamSinh.TabIndex = 13;
			this.lblNamSinh.TextAlign = ContentAlignment.MiddleLeft;
			this.label14.AutoSize = true;
			this.label14.BackColor = SystemColors.Control;
			this.label14.Location = new Point(307, 50);
			this.label14.Name = "label14";
			this.label14.Size = new Size(67, 15);
			this.label14.TabIndex = 12;
			this.label14.Text = "Năm sinh :";
			this.label14.TextAlign = ContentAlignment.MiddleRight;
			this.lblNgayDK.BackColor = Color.White;
			this.lblNgayDK.BorderStyle = BorderStyle.Fixed3D;
			this.lblNgayDK.Location = new Point(544, 24);
			this.lblNgayDK.Name = "lblNgayDK";
			this.lblNgayDK.Size = new Size(98, 20);
			this.lblNgayDK.TabIndex = 11;
			this.lblNgayDK.TextAlign = ContentAlignment.MiddleLeft;
			this.label12.AutoSize = true;
			this.label12.BackColor = SystemColors.Control;
			this.label12.Location = new Point(479, 27);
			this.label12.Name = "label12";
			this.label12.Size = new Size(61, 15);
			this.label12.TabIndex = 10;
			this.label12.Text = "Ngày ĐK :";
			this.label12.TextAlign = ContentAlignment.MiddleRight;
			this.lblSBL.BackColor = Color.White;
			this.lblSBL.BorderStyle = BorderStyle.Fixed3D;
			this.lblSBL.Location = new Point(377, 24);
			this.lblSBL.Name = "lblSBL";
			this.lblSBL.Size = new Size(98, 20);
			this.lblSBL.TabIndex = 9;
			this.lblSBL.TextAlign = ContentAlignment.MiddleLeft;
			this.label10.AutoSize = true;
			this.label10.BackColor = SystemColors.Control;
			this.label10.Location = new Point(328, 26);
			this.label10.Name = "label10";
			this.label10.Size = new Size(46, 15);
			this.label10.TabIndex = 8;
			this.label10.Text = "Số BL :";
			this.label10.TextAlign = ContentAlignment.MiddleRight;
			this.lblDiaChi.BackColor = Color.White;
			this.lblDiaChi.BorderStyle = BorderStyle.Fixed3D;
			this.lblDiaChi.Location = new Point(62, 72);
			this.lblDiaChi.Name = "lblDiaChi";
			this.lblDiaChi.Size = new Size(580, 20);
			this.lblDiaChi.TabIndex = 7;
			this.lblDiaChi.TextAlign = ContentAlignment.MiddleLeft;
			this.label8.AutoSize = true;
			this.label8.BackColor = SystemColors.Control;
			this.label8.Location = new Point(9, 74);
			this.label8.Name = "label8";
			this.label8.Size = new Size(51, 15);
			this.label8.TabIndex = 6;
			this.label8.Text = "Địa chỉ :";
			this.label8.TextAlign = ContentAlignment.MiddleRight;
			this.lblHoTen.BackColor = Color.White;
			this.lblHoTen.BorderStyle = BorderStyle.Fixed3D;
			this.lblHoTen.Location = new Point(62, 48);
			this.lblHoTen.Name = "lblHoTen";
			this.lblHoTen.Size = new Size(239, 20);
			this.lblHoTen.TabIndex = 5;
			this.lblHoTen.TextAlign = ContentAlignment.MiddleLeft;
			this.lblHoTen.TextChanged += new EventHandler(this.lblHoTen_TextChanged);
			this.label6.AutoSize = true;
			this.label6.BackColor = SystemColors.Control;
			this.label6.Location = new Point(9, 50);
			this.label6.Name = "label6";
			this.label6.Size = new Size(49, 15);
			this.label6.TabIndex = 4;
			this.label6.Text = "Họ tên :";
			this.label6.TextAlign = ContentAlignment.MiddleRight;
			this.lblPID.BackColor = Color.White;
			this.lblPID.BorderStyle = BorderStyle.Fixed3D;
			this.lblPID.Location = new Point(203, 24);
			this.lblPID.Name = "lblPID";
			this.lblPID.Size = new Size(98, 20);
			this.lblPID.TabIndex = 3;
			this.lblPID.TextAlign = ContentAlignment.MiddleLeft;
			this.label4.AutoSize = true;
			this.label4.BackColor = SystemColors.Control;
			this.label4.Location = new Point(167, 26);
			this.label4.Name = "label4";
			this.label4.Size = new Size(33, 15);
			this.label4.TabIndex = 2;
			this.label4.Text = "PID :";
			this.label4.TextAlign = ContentAlignment.MiddleRight;
			this.lblSTT.BackColor = Color.White;
			this.lblSTT.BorderStyle = BorderStyle.Fixed3D;
			this.lblSTT.Location = new Point(62, 24);
			this.lblSTT.Name = "lblSTT";
			this.lblSTT.Size = new Size(98, 20);
			this.lblSTT.TabIndex = 1;
			this.lblSTT.TextAlign = ContentAlignment.MiddleLeft;
			this.dgvPatientInfo.AllowUserToAddRows = false;
			this.dgvPatientInfo.AllowUserToDeleteRows = false;
			this.dgvPatientInfo.AllowUserToOrderColumns = true;
			this.dgvPatientInfo.AllowUserToResizeColumns = false;
			this.dgvPatientInfo.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.White;
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvPatientInfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvPatientInfo.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvPatientInfo.BackgroundColor = Color.White;
			this.dgvPatientInfo.BorderStyle = BorderStyle.Fixed3D;
			this.dgvPatientInfo.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvPatientInfo.Columns.AddRange(new DataGridViewColumn[]
			{
				this.SID,
				this.SoBL,
				this.HoTen,
				this.NamSinh,
				this.SoDT,
				this.DiaChi,
				this.Phai,
				this.SoCMND,
				this.ChanDoan,
				this.BacSi,
				this.GhiChu,
				this.STT,
				this.PID,
				this.NgayDangKy
			});
			this.dgvPatientInfo.Cursor = Cursors.Hand;
			this.dgvPatientInfo.EnableHeadersVisualStyles = false;
			this.dgvPatientInfo.Location = new Point(6, 190);
			this.dgvPatientInfo.MultiSelect = false;
			this.dgvPatientInfo.Name = "dgvPatientInfo";
			this.dgvPatientInfo.ReadOnly = true;
			this.dgvPatientInfo.RowHeadersVisible = false;
			this.dgvPatientInfo.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvPatientInfo.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvPatientInfo.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvPatientInfo.Size = new Size(872, 387);
			this.dgvPatientInfo.TabIndex = 3;
			this.dgvPatientInfo.CellEnter += new DataGridViewCellEventHandler(this.dgvPatientInfo_CellEnter);
			this.SID.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.SID.DataPropertyName = "SID";
			this.SID.HeaderText = "SID";
			this.SID.MinimumWidth = 120;
			this.SID.Name = "SID";
			this.SID.ReadOnly = true;
			this.SID.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.SID.Width = 120;
			this.SoBL.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.SoBL.DataPropertyName = "SoBL";
			this.SoBL.HeaderText = "Số BL";
			this.SoBL.MinimumWidth = 110;
			this.SoBL.Name = "SoBL";
			this.SoBL.ReadOnly = true;
			this.SoBL.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.SoBL.Width = 110;
			this.HoTen.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.HoTen.DataPropertyName = "HoTen";
			dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleLeft;
			dataGridViewCellStyle2.Format = "N0";
			dataGridViewCellStyle2.NullValue = null;
			this.HoTen.DefaultCellStyle = dataGridViewCellStyle2;
			this.HoTen.HeaderText = "Họ và tên";
			this.HoTen.MinimumWidth = 200;
			this.HoTen.Name = "HoTen";
			this.HoTen.ReadOnly = true;
			this.HoTen.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.HoTen.Width = 200;
			this.NamSinh.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.NamSinh.DataPropertyName = "NamSinh";
			dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleCenter;
			this.NamSinh.DefaultCellStyle = dataGridViewCellStyle3;
			this.NamSinh.HeaderText = "Năm sinh";
			this.NamSinh.MinimumWidth = 80;
			this.NamSinh.Name = "NamSinh";
			this.NamSinh.ReadOnly = true;
			this.NamSinh.Width = 80;
			this.SoDT.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.SoDT.DataPropertyName = "SoDT";
			this.SoDT.HeaderText = "Điện thoại";
			this.SoDT.MinimumWidth = 120;
			this.SoDT.Name = "SoDT";
			this.SoDT.ReadOnly = true;
			this.SoDT.Visible = false;
			this.SoDT.Width = 120;
			this.DiaChi.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.DiaChi.DataPropertyName = "DiaChi";
			this.DiaChi.HeaderText = "Địa chỉ";
			this.DiaChi.Name = "DiaChi";
			this.DiaChi.ReadOnly = true;
			this.Phai.DataPropertyName = "Phai";
			this.Phai.HeaderText = "Giới tính";
			this.Phai.Name = "Phai";
			this.Phai.ReadOnly = true;
			this.Phai.Visible = false;
			this.SoCMND.DataPropertyName = "SoCMND";
			this.SoCMND.HeaderText = "Số CMND";
			this.SoCMND.Name = "SoCMND";
			this.SoCMND.ReadOnly = true;
			this.SoCMND.Visible = false;
			this.ChanDoan.DataPropertyName = "ChanDoan";
			this.ChanDoan.HeaderText = "Chẩn đoán";
			this.ChanDoan.Name = "ChanDoan";
			this.ChanDoan.ReadOnly = true;
			this.ChanDoan.Visible = false;
			this.BacSi.DataPropertyName = "BacSi";
			this.BacSi.HeaderText = "Bác sĩ";
			this.BacSi.Name = "BacSi";
			this.BacSi.ReadOnly = true;
			this.BacSi.Visible = false;
			this.GhiChu.DataPropertyName = "GhiChu";
			this.GhiChu.HeaderText = "Ghi chú";
			this.GhiChu.Name = "GhiChu";
			this.GhiChu.ReadOnly = true;
			this.GhiChu.Visible = false;
			this.STT.DataPropertyName = "STT";
			this.STT.HeaderText = "STT";
			this.STT.Name = "STT";
			this.STT.ReadOnly = true;
			this.STT.Visible = false;
			this.PID.DataPropertyName = "PID";
			this.PID.HeaderText = "PID";
			this.PID.Name = "PID";
			this.PID.ReadOnly = true;
			this.PID.Visible = false;
			this.NgayDangKy.DataPropertyName = "NgayDangKy";
			this.NgayDangKy.HeaderText = "Ngày đăng ký";
			this.NgayDangKy.Name = "NgayDangKy";
			this.NgayDangKy.ReadOnly = true;
			this.NgayDangKy.Visible = false;
			this.bindingNavigator1.AddNewItem = null;
			this.bindingNavigator1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.bindingNavigator1.AutoSize = false;
			this.bindingNavigator1.BackColor = SystemColors.ButtonFace;
			this.bindingNavigator1.CountItem = this.bindingNavigatorCountItem;
			this.bindingNavigator1.CountItemFormat = "/ {0}";
			this.bindingNavigator1.DeleteItem = null;
			this.bindingNavigator1.Dock = DockStyle.None;
			this.bindingNavigator1.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.bindingNavigator1.GripStyle = ToolStripGripStyle.Hidden;
			this.bindingNavigator1.Items.AddRange(new ToolStripItem[]
			{
				this.bindingNavigatorMoveFirstItem,
				this.bindingNavigatorMovePreviousItem,
				this.bindingNavigatorSeparator,
				this.bindingNavigatorPositionItem,
				this.bindingNavigatorCountItem,
				this.bindingNavigatorSeparator1,
				this.bindingNavigatorMoveNextItem,
				this.bindingNavigatorMoveLastItem,
				this.bindingNavigatorSeparator2
			});
			this.bindingNavigator1.Location = new Point(6, 584);
			this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
			this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem;
			this.bindingNavigator1.MoveNextItem = this.bindingNavigatorMoveNextItem;
			this.bindingNavigator1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
			this.bindingNavigator1.Name = "bindingNavigator1";
			this.bindingNavigator1.PositionItem = this.bindingNavigatorPositionItem;
			this.bindingNavigator1.RenderMode = ToolStripRenderMode.Professional;
			this.bindingNavigator1.Size = new Size(675, 25);
			this.bindingNavigator1.TabIndex = 4;
			this.bindingNavigator1.Text = "bindingNavigator1";
			this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
			this.bindingNavigatorCountItem.Size = new Size(28, 22);
			this.bindingNavigatorCountItem.Text = "/ {0}";
			this.bindingNavigatorCountItem.ToolTipText = "Total number of items";
			this.bindingNavigatorMoveFirstItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
//			//this.bindingNavigatorMoveFirstItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveFirstItem.Image");
			this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
			this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveFirstItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveFirstItem.Text = "Move first";
			this.bindingNavigatorMovePreviousItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ////this.bindingNavigatorMovePreviousItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMovePreviousItem.Image");
			this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
			this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMovePreviousItem.Size = new Size(23, 22);
			this.bindingNavigatorMovePreviousItem.Text = "Move previous";
			this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
			this.bindingNavigatorSeparator.Size = new Size(6, 25);
			this.bindingNavigatorPositionItem.AccessibleName = "Position";
			this.bindingNavigatorPositionItem.AutoSize = false;
			this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
			this.bindingNavigatorPositionItem.Size = new Size(50, 23);
			this.bindingNavigatorPositionItem.Text = "0";
			this.bindingNavigatorPositionItem.ToolTipText = "Current position";
			this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
			this.bindingNavigatorSeparator1.Size = new Size(6, 25);
			this.bindingNavigatorMoveNextItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ////this.bindingNavigatorMoveNextItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveNextItem.Image");
			this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
			this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveNextItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveNextItem.Text = "Move next";
			this.bindingNavigatorMoveLastItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
            ////this.bindingNavigatorMoveLastItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveLastItem.Image");
			this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
			this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveLastItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveLastItem.Text = "Move last";
			this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
			this.bindingNavigatorSeparator2.Size = new Size(6, 25);
			this.btnSelect.Cursor = Cursors.Hand;
			this.btnSelect.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSelect.Location = new Point(684, 580);
			this.btnSelect.Name = "btnSelect";
			this.btnSelect.Size = new Size(102, 30);
			this.btnSelect.TabIndex = 5;
			this.btnSelect.Text = "Chọn thông tin";
			this.btnSelect.UseVisualStyleBackColor = true;
			this.btnSelect.Click += new EventHandler(this.btnSelect_Click);
			this.button1.Cursor = Cursors.Hand;
			this.button1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.button1.Location = new Point(788, 580);
			this.button1.Name = "button1";
			this.button1.Size = new Size(90, 30);
			this.button1.TabIndex = 6;
			this.button1.Text = "Thoát [ ESC ]";
			this.button1.UseVisualStyleBackColor = true;
			this.button1.Click += new EventHandler(this.button1_Click);
			this.label25.BackColor = Color.FromArgb(255, 255, 192);
			this.label25.BorderStyle = BorderStyle.Fixed3D;
			this.label25.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label25.Location = new Point(6, 9);
			this.label25.Name = "label25";
			this.label25.Size = new Size(151, 24);
			this.label25.TabIndex = 146;
			this.label25.Text = "Tìm kiếm bệnh nhân ";
			this.label25.TextAlign = ContentAlignment.MiddleRight;
			this.label26.BackColor = Color.FromArgb(255, 255, 192);
			this.label26.BorderStyle = BorderStyle.Fixed3D;
			this.label26.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label26.Location = new Point(163, 9);
			this.label26.Name = "label26";
			this.label26.Size = new Size(72, 24);
			this.label26.TabIndex = 147;
			this.label26.Text = "SID :";
			this.label26.TextAlign = ContentAlignment.MiddleRight;
			this.label27.BackColor = Color.FromArgb(255, 255, 192);
			this.label27.BorderStyle = BorderStyle.Fixed3D;
			this.label27.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label27.Location = new Point(163, 37);
			this.label27.Name = "label27";
			this.label27.Size = new Size(72, 24);
			this.label27.TabIndex = 148;
			this.label27.Text = "SBL :";
			this.label27.TextAlign = ContentAlignment.MiddleRight;
			this.btnSearch.Cursor = Cursors.Hand;
			this.btnSearch.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSearch.Location = new Point(654, 8);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new Size(224, 54);
			this.btnSearch.TabIndex = 2;
			this.btnSearch.Text = "TÌM BỆNH NHÂN";
			this.btnSearch.UseVisualStyleBackColor = true;
			this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
			this.txtSearchBySID.Font = new Font("Arial", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtSearchBySID.Location = new Point(241, 9);
			this.txtSearchBySID.Name = "txtSearchBySID";
			this.txtSearchBySID.Size = new Size(407, 25);
			this.txtSearchBySID.TabIndex = 0;
			this.txtSearchBySID.KeyDown += new KeyEventHandler(this.txtSearchBySID_KeyDown);
			this.txtSearchBySID.Enter += new EventHandler(this.txtSearchBySID_Enter);
			this.txtSearchBySBL.Font = new Font("Arial", 11.25f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtSearchBySBL.Location = new Point(241, 37);
			this.txtSearchBySBL.Name = "txtSearchBySBL";
			this.txtSearchBySBL.Size = new Size(407, 25);
			this.txtSearchBySBL.TabIndex = 1;
			this.txtSearchBySBL.Enter += new EventHandler(this.txtSearchBySBL_Enter);
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(884, 616);
			base.Controls.Add(this.txtSearchBySBL);
			base.Controls.Add(this.txtSearchBySID);
			base.Controls.Add(this.btnSearch);
			base.Controls.Add(this.label27);
			base.Controls.Add(this.label26);
			base.Controls.Add(this.label25);
			base.Controls.Add(this.button1);
			base.Controls.Add(this.btnSelect);
			base.Controls.Add(this.bindingNavigator1);
			base.Controls.Add(this.dgvPatientInfo);
			base.Controls.Add(this.groupBox1);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmListPatient";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = " ..: DANH SÁCH BỆNH NHÂN";
			base.Load += new EventHandler(this.frmListPatient_Load);
			base.KeyDown += new KeyEventHandler(this.frmListPatient_KeyDown);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			((ISupportInitialize)this.dgvPatientInfo).EndInit();
			((ISupportInitialize)this.bindingNavigator1).EndInit();
			this.bindingNavigator1.ResumeLayout(false);
			this.bindingNavigator1.PerformLayout();
			base.ResumeLayout(false);
			base.PerformLayout();
		}
	}
}
